import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import router from './router';
import axios from 'axios'; // 引入 axios

import Echarts from "vue-echarts"
import * as echarts from "echarts"

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
  
app.component("v-chart", Echarts)
app.config.globalProperties.$echarts = echarts
app.config.globalProperties.$axios = axios;
app.use(ElementPlus)
app.use(router)
app.mount('#app')